
import Api from '@/database'
import { defineWrappedResponseHandler } from '../utils/handler'

const handler = defineEventHandler(async (e) => {
  const primaryKey: any = Api.base.showPrimaryKey()
  const body = await readBody(e)
  return await Api.used.use(body.table, body[primaryKey])
})

export default defineWrappedResponseHandler(handler)